fd778e617f7835b51f8879a86761ee8036e0a915,modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java,TcpClientDiscoverySpi,joinTopology,#boolean#,406

Before Change



                Iterator<InetSocketAddress> it = addrs.iterator();

                while (it.hasNext() && !Thread.currentThread().isInterrupted()) {
                    InetSocketAddress addr = it.next();

                    Socket sock = null;

After Change


    private Socket joinTopology(boolean recon) throws IgniteSpiException, InterruptedException {
        Collection<InetSocketAddress> addrs = null;

        while (true) {
            if (Thread.currentThread().isInterrupted())
                throw new InterruptedException();

            while (addrs == null || addrs.isEmpty()) {
                addrs = resolvedAddresses();

                if (!F.isEmpty(addrs)) {
                    if (log.isDebugEnabled())
                        log.debug("Resolved addresses from IP finder: " + addrs);
                }
                else {
                    U.warn(log, "No addresses registered in the IP finder (will retry in 2000ms): " + ipFinder);

                    Thread.sleep(2000);
                }
            }

            Collection<InetSocketAddress> addrs0 = new ArrayList<>(addrs);

            Iterator<InetSocketAddress> it = addrs.iterator();

            while (it.hasNext()) {
                if (Thread.currentThread().isInterrupted())
                    throw new InterruptedException();

                InetSocketAddress addr = it.next();